@extends('admin.layouts.app')
@section('content')

@if(count($errors))
<div class="alert alert-danger alert-block fade in">
    <button type="button" class="close close-sm" data-dismiss="alert"><i class="fa fa-times"></i></button>
    <h4><i class="icon-ok-sign"></i>验证错误!</h4>
    @foreach ($errors->all() as $error)
        <p>{{ $error }}</p>
    @endforeach
</div>
@endif

<div class="row">
    <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading custom-tab dark-tab">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#home2" data-toggle="tab">基本信息</a>
                    </li>
                    <li class="">
                        <a href="#about2" data-toggle="tab">优化</a>
                    </li>
                    <li class="">
                        <a href="#profile2" data-toggle="tab">其他信息</a>
                    </li>
                </ul>
            </header>

            <form class="form-horizontal adminex-form" method="post" action="{{url('info/add')}}">
            {{ csrf_field() }}
            <div class="panel-body">
                    <div class="tab-content">
                        <div class="tab-pane active" id="home2">
                            <input type="hidden" value="{{$cate->cate_id}}" name="cate_id">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">所属栏目</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control"  value="{{$cate->name}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">标题</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="title" value="{{old('title')}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">栏目图</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="picture" value="{{old('picture')}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">简短内容</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="zhaiyao" value="{{old('zhaiyao')}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">内容</label>
                                <div class="col-sm-10">
                                <textarea name="content" id="content" >{{old('content')}}</textarea>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="about2">
                          
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面关键词</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="keywords" value="{{old('keywords')}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面描述</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="description" value="{{old('description')}}">
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="profile2">
                           
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">来源</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="from" value="{{old('from')}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">发表时间</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control " name="creattime" value="{{old('creattime')}}"  onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">点击次数</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="hit" value="{{old('hit')}}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">作者</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="author" value="{{old('author')}}">
                                </div>
                            </div>
                        </div>
                        <!-- <div class="tab-pane" id="contact2">Contact</div> -->
                    </div>
                    <div class="panel-body">
                        <div class="col-lg-offset-2 col-lg-10">
                            <button type="submit" class="btn btn-success">提交</button>
                            <button type="reset" class="btn btn-default">重置</button>
                        </div>
                    </div>
            </div>
            </form>
        </section>
    </div>
</div>

@endsection




@section('js')
<script language="javascript" type="text/javascript" src="{{asset('adminex/js/My97DatePicker/WdatePicker.js')}}"></script>

<script type="text/javascript" charset="utf-8" src="{{asset('utf8php')}}/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="{{asset('utf8php')}}/ueditor.all.js"> </script>
<script type="text/javascript" charset="utf-8" src="{{asset('utf8php')}}/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('content');
</script>
@endsection